package windbell.domain.risk.impl;

import edu.fudan.mylang.pf.BaseDAOService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;
import windbell.domain.risk.RiskCheckTemplate;
import windbell.domain.risk.RiskCheckTemplateDAO;
import windbell.domain.risk.RiskCheckTemplateOwner;
import windbell.domain.risk.impl.RiskCheckTemplateImpl;

@Service("windbell.domain.risk.RiskCheckTemplateDAO")
public class RiskCheckTemplateDAOImpl extends BaseDAOService<RiskCheckTemplate> implements RiskCheckTemplateDAO {
  public RiskCheckTemplate create(final RiskCheckTemplateOwner owner, final Procedure1<? super RiskCheckTemplate> init) {
    RiskCheckTemplate riskCheckTemplate=RiskCheckTemplateImpl.create(owner,getObjectFactory());
    
    final Procedure1<RiskCheckTemplate> _function = new Procedure1<RiskCheckTemplate>() {
        public void apply(final RiskCheckTemplate it) {
          init.apply(it);
        }
      };
    RiskCheckTemplate _doubleArrow = ObjectExtensions.<RiskCheckTemplate>operator_doubleArrow(riskCheckTemplate, _function);
    return _doubleArrow;
  }
}
